package com.feeyin.radar.crm.dao.impl;

import java.util.ArrayList;
import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.feeyin.radar.crm.dao.ContractSubCaseDAO;
import com.feeyin.radar.crm.model.SubContractCase;

public class ContractSubCaseDAOImpl extends SqlMapClientDaoSupport implements ContractSubCaseDAO {

	
	public void insertSubCase(SubContractCase case1) {
		getSqlMapClientTemplate().insert("insertContractSubCase",case1);

	}

	
	public List<SubContractCase> getSubCaseList(Long caseId) {
		// TODO Auto-generated method stub
		List<SubContractCase> list = (List<SubContractCase>)getSqlMapClientTemplate().queryForList("getContractSubCaseByContractCode",caseId.toString());
		if(list==null)
			list = new ArrayList<SubContractCase>();
		return list;
	}

	
	public void deleteSubCaseList(Long caseId) {
		getSqlMapClientTemplate().delete("deleteContractSubCase",caseId);

	}

}
